# Maintainer: André Klitzing <aklitzing@gmail.com>
# Contributor: André Klitzing <aklitzing@gmail.com>
pkgname=clazy
pkgver=1.12
pkgrel=1
pkgdesc="Qt oriented code checker based on clang framework"
url="https://invent.kde.org/sdk/clazy"
arch="all"
license="LGPL-2.0-only"
_llvmver=18
makedepends="
	clang$_llvmver-dev
	cmake
	llvm$_llvmver-dev
	perl
	samurai
	"
options="!check" # cannot run tests without installation
subpackages="$pkgname-doc"
source="https://download.kde.org/stable/clazy/$pkgver/src/clazy-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DLLVM_ROOT=/usr/lib/llvm$_llvmver \
		-DLLVM_CONFIG_EXECUTABLE=/usr/lib/llvm$_llvmver/bin/llvm-config \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
7a2b4a753098f15936a4731c82c660c1cd4d81949279435e87f00f7f72bef3e32cb574c8991c0707798581278e9fbcae34d354c1e6b77a15a5e26166d658fa9e  clazy-1.12.tar.xz
"
